﻿namespace N2.BlogEngine
{
	using N2;
	using N2.BlogEngine.Items;
	using N2.Configuration;
	
	static class BlogService
	{
		public static BlogContainer CurrentBlog {
			get {
				return Context.UrlParser.StartPage
					.GetOrFindOrCreateChild<BlogContainer>("Blog", null);
			}
		}

		static EditSection s_editSection;
		internal static EditSection EditSection {
			get {
				return s_editSection
					?? Context.Current.Resolve<EditSection>()
					?? new EditSection { UploadFolders = new FileSystemFolderCollection() };
			}
		}
	}
}
